﻿using System;
using Controller;

public partial class Modules_TinTucRightControl : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            BindTinxemnhieunhat();
            BindTinmoinhat();
        }
    }
    public void BindTinxemnhieunhat()
    {
        var controller = new VYC06Controller();
        var model = controller.GetByView();

        if (model.Count > 0)
        {
            repeaterXemnhieunhat.DataSource = model;
            repeaterXemnhieunhat.DataBind();
        }
    }

    public void BindTinmoinhat()
    {
        var controller = new VYC06Controller();
        var model = controller.GetByNewest();

        if (model.Count > 0)
        {
            repeaterTinmoinhat.DataSource = model;
            repeaterTinmoinhat.DataBind();
        }
    }

}